<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>7_文本溢出替换省略号</title>
    <style>
        div{
            background-color: #ff0;
            width: 200px;
            white-space: nowrap; /*不允许换行*/
            overflow: hidden; /*溢出部分隐藏*/
            text-overflow: ellipsis; /*超出文字替换为省略号*/
        }
    </style>
</head>
<body>
    <div>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi asperiores assumenda consectetur distinctio, earum enim error fugiat ipsa iusto laborum modi mollitia necessitatibus nobis omnis sunt vel voluptatum! Aut, dignissimos?
    </div>
</body>
</html>